<!--
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-06-24 08:59:27
 * @LastEditors: voanit
 * @LastEditTime: 2022-06-29 16:49:09
-->
<template>
  <div>
    御剑乘风来,除魔天地间!==second==={{ msg }}======================={{ vm }}
    <button @click="btn">second</button>
  </div>
</template>
           
<script>
export default {
  name: 'secondCom',
  // model: {
  //   prop: 'vm'  //和v-model一起使用   表示v-model传过来的值原先默认是value,在这里自定义之后原先的value无效，需要使用vm接收
  // },
  props: {
    vm: {
      type: String
    }
  },
  data () {
    return {

    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    btn () {
      // this.vm = 'red'
      this.$emit('update:vm', 'red')
    }
  }
}
</script>
<style lang='less'  scoped>
</style>